home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
INFO
/
XFDISK.ZIP
/
CP3204.1R
< prev
next >
Wrap
Text File
|
1991-08-28
|
11KB
|
378 lines
F 0100 07FF 0
A 100
MOV AX,CS ; get CS register
MOV DS,AX ; initialize DS register
MOV ES,AX ; initialize DS register
;
MOV AH,30 ; get function code to check DOS version
INT 21 ; call DOS routine to get version number
CMP AL,5 ; check for DOS version 5.00 or higher
JGE 112 ; JGE CONTINUE to partition fixed disk
; otherwise, incorrect DOS version
MOV AL,80 ; set ERRORLEVEL value to indicate incorrect DOS version
JMP 130 ; JMP ERROR
;
;[CONTINUE]
MOV SI,0003 ; initalize loop counter
;
;[LOOP]
MOV AH,03 ; get function code to write to disk
MOV AL,02 ; get number of sectors to write
MOV BX,0200 ; ES:BX points to beginning of data
MOV CX,0001 ; set CH to low order byte for cylinder number
; set CL lower 6-bits to sector number
; set CL upper 2-bits to high order bits for cylinder number
MOV DH,00 ; get number for head (side)
MOV DL,80 ; get drive number for 1st fixed disk
INT 13 ; call BIOS routine which provides disk services
JNC 0134 ; JNC WRITEOK if no error
; otherwise, . . .
MOV AH,0 ; get function code to reset disk system
INT 13 ; call BIOS routine which provides disk services
DEC SI ; decrement loop counter
JNZ 0115 ; JNZ LOOP to try to write to disk again
; otherwise, . . .
MOV AL,02 ; set ERRORLEVEL value to indicate error
; ; and . . .
;[ERROR] terminate program with ERRORLEVEL value
MOV AH,4C ; get function code to teminate program
INT 21 ; and exit program
;
;[WRITEOK]
MOV AL,00 ; set ERRORLEVEL value to indicate success
MOV AH,4C ; get function code to teminate program
INT 21 ; and exit program
NOP
A 200
CLI
XOR AX,AX
MOV DS,AX
MOV ES,AX
MOV SS,AX
MOV SP,7C00
MOV SI,SP
STI
CLD
MOV DI,600
MOV CX,100
REPNZ
MOVSW
JMP 0:61D
MOV SI,7BE
MOV BL,4
CMP BYTE PTR [SI],80
JZ 235
CMP BYTE PTR [SI],0
JNZ 248
ADD SI,+10
DEC BL
JNZ 222
INT 18
MOV DX,[SI]
MOV CX,[SI+2]
MOV BP,SI
ADD SI,+10
DEC BL
JZ 25D
CMP BYTE PTR [SI],0
JZ 23C
MOV SI,68B
LODSB
CMP AL,0
JZ 25B
PUSH SI
MOV BX,7
MOV AH,E
INT 10
POP SI
JMP 24B
JMP 25B
MOV DI,3
PUSH DI
MOV BX,7C00
MOV AX,201
INT 13
POP DI
JNC 278
XOR AX,AX
INT 13
DEC DI
JNZ 260
MOV SI,6A5
JMP 24B
MOV SI,6C6
MOV DI,7DFE
CMP WORD PTR [DI],AA55
JNZ 24B
MOV SI,BP
JMP 0:7C00
E 28B D A "Invalid Partition Table" 0
E 2A5 D A "Error Loading Operating System" 0
E 2C6 D A "Missing Operating System" 0
F 2E1 3FD 0
E 3FE 55 AA
A 400
JMP 43E
NOP
E 403 "DWPerson"
E 40B 00 02
E 40D 02
E 40E 01 00
E 410 02
E 411 00 02
E 413 00 00
E 415 F8
E 416 CB 00
E 418 33 00
E 41A 0F 00
E 41C 01 00 00 00
E 420 67 96 01 00
E 424 80
E 425 00
E 426 29
E 427 31 08 91 19
E 42B "FDISK"
E 430 "1"
E 431 " VOL"
E 435 "?"
E 436 "FAT16 "
A 43E
CLI
XOR AX,AX
MOV ES,AX
MOV SS,AX
MOV SP,7C00
MOV BX,78
SS: LDS SI,[BX]
PUSH DS
PUSH SI
PUSH SS
PUSH BX
MOV DI,7C3E
MOV CX,B
CLD
REPZ
MOVSB
PUSH ES
POP DS
MOV BYTE PTR [DI-2],F
MOV CX,[7C18]
MOV [DI-7],CL
MOV [BX+2],AX
MOV WORD PTR [BX],7C3E
STI
INT 13
JC 4ED
XOR AX,AX
CMP [7C13],AX
JZ 484
MOV CX,[7C13]
MOV [7C20],CX
MOV AL,[7C10]
MUL WORD PTR [7C16]
ADD AX,[7C1C]
ADC DX,[7C1E]
ADD AX,[7C0E]
ADC DX,0
MOV [7C50],AX
MOV [7C52],DX
MOV [7C49],AX
MOV [7C4B],DX
MOV AX,20
MUL WORD PTR [7C11]
MOV BX,[7C0B]
ADD AX,BX
DEC AX
DIV BX
ADD [7C49],AX
ADC WORD PTR [7C4B],0
MOV BX,500
MOV DX,[7C52]
MOV AX,[7C50]
CALL 560
JC 4ED
MOV AL,1
CALL 581
JC 4ED
MOV DI,BX
MOV CX,B
MOV SI,7DE6
REPZ
CMPSB
JNZ 4ED
LEA DI,[BX+20]
MOV CX,B
REPZ
CMPSB
JZ 505
MOV SI,7D9E
CALL 552
XOR AX,AX
INT 16
POP SI
POP DS
POP [SI]
POP [SI+2]
INT 19
POP AX
POP AX
POP AX
JMP 4ED
MOV AX,[BX+1A]
DEC AX
DEC AX
MOV BL,[7C0D]
XOR BH,BH
MUL BX
ADD AX,[7C49]
ADC DX,[7C4B]
MOV BX,700
MOV CX,3
PUSH AX
PUSH DX
PUSH CX
CALL 560
JC 500
MOV AL,1
CALL 581
POP CX
POP DX
POP AX
JC 4ED
ADD AX,1
ADC DX,0
ADD BX,[7C0B]
LOOP 520
MOV CH,[7C15]
MOV DL,[7C24]
MOV BX,[7C49]
MOV AX,[7C4B]
JMP 70:0
LODSB
OR AL,AL
JZ 580
MOV AH,E
MOV BX,7
INT 10
JMP 552
CMP DX,[7C18]
JNC 57F
DIV WORD PTR [7C18]
INC DL
MOV [7C4F],DL
XOR DX,DX
DIV WORD PTR [7C1A]
MOV [7C25],DL
MOV [7C4D],AX
CLC
RET
STC
RET
MOV AH,2
MOV DX,[7C4D]
MOV CL,6
SHL DH,CL
OR DH,[7C4F]
MOV CX,DX
XCHG CH,CL
MOV DL,[7C24]
MOV DH,[7C25]
INT 13
RET
E 59E D A "Non-system disk or disk error"
E 5BD D A "Replace and press any key when ready"
E 5E3 D A 0
E 5E6 "IO SYS"
E 5F1 "MSDOS SYS"
E 5FE 55 AA
E 600 F8 FF FF FF
E 3BE 80
E 3BF 00
E 3C0 02
E 3C1 00
E 3C2 06
E 3C3 0E
E 3C4 33
E 3C5 87
E 3C6 01 00 00 00
E 3CA 67 96 01 00
E 3CE 00
E 3CF 00
E 3D0 01
E 3D1 88
E 3D2 05
E 3D3 0E
E 3D4 B3
E 3D5 1F
E 3D6 68 96 01 00
E 3DA 38 C3 04 00
E 435 "1"
G=100 138
F 200 2E0 0
F 43E 5FD 0
E 3BE 00
E 3BF 00
E 3C0 02
E 3C1 88
E 3C2 06
E 3C3 0E
E 3C4 73
E 3C5 0F
E 3C6 01 00 00 00
E 3CA 67 96 01 00
E 3CE 00
E 3CF 00
E 3D0 41
E 3D1 10
E 3D2 05
E 3D3 0E
E 3D4 73
E 3D5 97
E 3D6 68 96 01 00
E 3DA 68 96 01 00
E 11D 01 88
E 435 "2"
G=100 138
E 3BE 00
E 3BF 00
E 3C0 42
E 3C1 10
E 3C2 06
E 3C3 0E
E 3C4 73
E 3C5 97
E 3C6 01 00 00 00
E 3CA 67 96 01 00
E 3CE 00
E 3CF 00
E 3D0 41
E 3D1 98
E 3D2 05
E 3D3 0E
E 3D4 B3
E 3D5 1F
E 3D6 D0 2C 03 00
E 3DA 68 96 01 00
E 11D 41 10
E 435 "3"
G=100 138
E 3BE 00
E 3BF 00
E 3C0 42
E 3C1 98
E 3C2 06
E 3C3 0E
E 3C4 B3
E 3C5 1F
E 3C6 01 00 00 00
E 3CA 67 96 01 00
F 3CE 3DD 0
E 11D 41 98
E 435 "4"
G=100
Q